#pragma once

#include"Engine.h"

namespace Advanced2D{
	class Camera{
	private:
		D3DXVECTOR2 position; //Toa do camera	
		Entity* entity; //Toa do nhan vat ma camera theo doi
		D3DXVECTOR2 sizeView;// Kich thuoc camera nhin thay
		D3DXVECTOR2 sizeWorld;// Kich thuoc world		
		 
	public:
		Camera();
		~Camera(){}

		void setPosition(int x, int y){ position = D3DXVECTOR2((float)x, (float)y); }
		D3DXVECTOR2 getPosition(){ return position; }
		void setPositionX(int value){ position.x = (float)value; }
		int getPositionX(){ return (int)position.x; }
		void setPositionY(int value){ position.y = (float)value; }
		int getPositionY(){ return (int)position.y; }

		
		
		void setSizeView(int widthView, int heightView){ sizeView = D3DXVECTOR2((float)widthView, (float)heightView); }
		
		void setSizeWorld(int widthWorld, int heightWorld){ sizeWorld = D3DXVECTOR2((float)widthWorld, (float)heightWorld); }
				
		void Init(Entity* entity);
		void Update();		
		D3DXVECTOR2 transform(D3DXVECTOR2& PositionWorldEntity);		
	};
};